<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
</head>
<body>
<a href="https://www.xiaobangcai.com" id="d1" target="_blank">你好</a>
<script type="text/javascript">
    var index = 0;
    var list = document.getElementsByClassName("a");
    var btn;
    setInterval(()=>{
        btn = list[index];
        // 兼容IE
        btn.onclick = function(){
            console.log("d1");
        }
        if(document.all) {
            document.getElementById("d1").click();
        }
        // 兼容其它浏览器
        else {
            var e = document.createEvent("MouseEvents");
            e.initEvent("click", true, true);
            document.getElementById("d1").dispatchEvent(e);
        }
        index++;
    },3000); // 3秒后执行	*/

</script>
</body>
</html>